<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>Document</title>
        <link rel="stylesheet" href="../../css/common-test.css" />
        <style>
            *{
                padding: 0;
                margin: 0;
            }
            .box-200-200{
                width: 200px;
                height: 200px;
                background-color: #fc0;
            }
            .bgc-fc0{
                background-color: #fc0;
            }
            .bgc-f0c{
                background-color: #f0c;
            }
            .bgc-0fc{
                background-color: #0fc;
            }
            .bgc-cf0{
                background-color: #cf0;
            }
            .bgc-c0f{
                background-color: #c0f;
            }
            .bgc-0cf{
                background-color: #0cf;
            }
            .bgc-red{
                background-color: red;
            }
            .bgc-green{
                background-color: green;
            }
            .bgc-blue{
                background-color: #00f;
            }
            .bgc-ccc{
                background-color: #ccc;
            }
            .c-black{
                color: #000;
            }
            .c-333{
                color: #333;
            }
            .c-666{
                color: #666;
            }
            .c-eee{
                color: #eee;
            }
            .c-999{
                color: #999;
            }
            .m-20-auto{
                margin: 20px auto;
            }
            .m20{
                margin: 20px;
            }
            .p20{
                padding: 20px;
            }
        </style>
    </head>
    <body>
        <h1>深入理解CSS中的层叠上下文和层叠顺序</h1>
        <p><a href="https://www.zhangxinxu.com/wordpress/2016/01/understand-css-stacking-context-order-z-index/">来源</a></p>
        <h2>z-index:auto;</h2>
        <div style="position:relative; z-index:auto;">
            <img src="https://image.zhangxinxu.com/image/study/s/s256/mm1.jpg" style="position:absolute; z-index:2;"><!-- 横妹子 -->
        </div>
        <div style="position:relative; z-index:auto;">
            <img src="https://image.zhangxinxu.com/image/study/s/s256/mm2.jpg" style="position:relative; z-index:1;"><!-- 竖妹子 -->
        </div>
        <h2>z-index:0;</h2>
        <div style="position:relative; z-index:0;">
            <img src="https://image.zhangxinxu.com/image/study/s/s256/mm1.jpg" style="position:absolute; z-index:2;">
        </div>
        <div style="position:relative; z-index:0;">
            <img src="https://image.zhangxinxu.com/image/study/s/s256/mm2.jpg" style="position:relative; z-index:1;">
        </div>
        <script>

        </script>
    </body>
</html>